package com.lzh.controller;

import com.lzh.pojo.resp.BaseResp;
import com.lzh.service.QuesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author Li
 * @ 2022/4/7
 */
@RequestMapping("/question")
@RestController
@CrossOrigin
public class QuesController {

    @Autowired(required = false)
    QuesService quesService ;

    @RequestMapping("/findAll")
    public BaseResp find(){
        return quesService.find() ;
    }

    @RequestMapping("/findById")
    public BaseResp find(@RequestBody Map map){
        return quesService.findById(map) ;
    }
}
